
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>为什么选择 Taro For Harmony？ · Taro for Harmony教程</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="坚果派">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-chapter-fold/chapter-fold.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-mind-maps/mindmaps.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-emphasize/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-anchors/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-ace/ace.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-theme-lou/lou.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="styles/website.css">
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="chapter1/1.Taro介绍.html" />
    
    
    <link rel="prev" href="./" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"};
    </script>

    </head>
    <body>
         
<div class="donate-modal modal">
  <div class="modal-header">
    <div>
      <span>
        <img
          id="modal-avatar"
          class="modal-avatar"
          src="http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"
        />
      </span>
      <span id="nickname"> breeze </span>
      <p class="modal-close close" onclick="closeDonateModal()">×</p>
    </div>
    <div class="message">
      <div class="tip">
        <i></i>
        <span>随意打赏，但不要超过一顿早餐钱 💕</span>
      </div>
    </div>
  </div>
  <div class="modal-content">
    <div class="modal-pay-way">
      <div id="wxpay" onclick="showDonateImg(0)">
        <input
          type="radio"
          name="pay-way"
          value="wxpay"
          class="zs-type"
          checked="checked"
        />
        <span>
          <img
            id="wxpay-logo"
            src=""
          />
        </span>
      </div>
      <div id="alipay" onclick="showDonateImg(1)">
        <input type="radio" name="pay-way" value="alipay" class="zs-type" />
        <span>
          <img
            id="alipay-logo"
            src=""
          />
        </span>
      </div>
    </div>
    <div class="modal-pay-qrcode">
      <img id="wxpay-code" src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png" />
      <img
        id="alipay-code"
        src="https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png"
        hidden
      />
    </div>
  </div>
</div>
<div class="mask"></div>


<div class="book">
  <div class="header-inner">
    <!-- LOGO -->
    <div class="logo"></div>
    <span class="title"></span>

    <!-- Search -->
    
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>


    <!-- Nav -->
    <ul class="header-nav">
      <li>
        <a href="https://www.gitbook.com/" target="_blank">坚果派官网</a>
      </li><li>
        <a href="https://www.npmjs.com/package/package" target="_blank">ArkUI实战</a>
      </li><li>
        <a href="https://space.bilibili.com/480883651" target="_blank">元服务开发实践</a>
      </li><li>
        <a href="https://blog.51cto.com/jianguo" target="_blank">OpenHarmony应用开发</a>
      </li>
    </ul>
  </div>

  <div class="book-summary">
    <div class="book-summary-title">文档目录</div>
     
    <nav role="navigation">


<ul class="summary">
    
    

    

    
        
        <li class="header">第一篇：基础篇</li>
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.2" data-path="为什么要写博客.html">
            
                <a href="为什么要写博客.html">
            
                    
                    为什么选择 Taro For Harmony？
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第二篇：Taro 入门</li>
        
        
    
        <li class="chapter " data-level="2.1" data-path="chapter1/1.Taro介绍.html">
            
                <a href="chapter1/1.Taro介绍.html">
            
                    
                    3.1 Taro 框架介绍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="chapter1/2.安装Taro.html">
            
                <a href="chapter1/2.安装Taro.html">
            
                    
                    3.2 安装与配置 Taro
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="chapter1/3.Taro运行多平台.html">
            
                <a href="chapter1/3.Taro运行多平台.html">
            
                    
                    3.3 Taro 多平台运行
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="chapter1/4.Taro配置.html">
            
                <a href="chapter1/4.Taro配置.html">
            
                    
                    3.4 Taro 项目配置详解
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第三篇：鸿蒙平台开发</li>
        
        
    
        <li class="chapter " data-level="3.1" data-path="chapter1/5.鸿蒙版Taro搭建开发环境.html">
            
                <a href="chapter1/5.鸿蒙版Taro搭建开发环境.html">
            
                    
                    4.1 鸿蒙版 Taro 开发环境搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="chapter1/6.鸿蒙版taro编译配置.html">
            
                <a href="chapter1/6.鸿蒙版taro编译配置.html">
            
                    
                    4.2 鸿蒙版 Taro 编译配置
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第四篇：进阶开发</li>
        
        
    
        <li class="chapter " data-level="4.1" data-path="chapter5/1.组件开发与适配.html">
            
                <a href="chapter5/1.组件开发与适配.html">
            
                    
                    5.1 组件开发与适配
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="chapter5/2.状态管理.md">
            
                <span>
            
                    
                    5.2 状态管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="chapter5/3.路由与导航.md">
            
                <span>
            
                    
                    5.3 路由与导航
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="chapter5/4.网络请求与数据处理.md">
            
                <span>
            
                    
                    5.4 网络请求与数据处理
            
                </a>
            

            
        </li>
    

    
        
        <li class="header">第五篇：实战项目</li>
        
        
    
        <li class="chapter " data-level="5.1" data-path="chapter6/1.项目架构设计.md">
            
                <span>
            
                    
                    6.1 项目架构设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="chapter6/2.实战案例.md">
            
                <span>
            
                    
                    6.2 实战案例：待办事项应用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="chapter6/3.性能优化与调试.md">
            
                <span>
            
                    
                    6.3 性能优化与调试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="chapter6/4.发布与部署.md">
            
                <span>
            
                    
                    6.4 发布与部署
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>

</nav>
     
  </div>

  <!-- Content nav -->
  <div class="book-anchor">
    <div class="book-anchor-title"></div>

    <div class="book-anchor-body"></div>
  </div>

  <div class="book-body">
    
    <div class="body-inner">
       

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >为什么选择 Taro For Harmony？</a>
    </h1>
</div>



      <div class="page-wrapper" tabindex="-1" role="main">
        <div class="page-inner">
          
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
          <section class="normal markdown-section">
             
                <div id="vip-container">
                    <h1 id="&#x4E3A;&#x4EC0;&#x4E48;&#x9009;&#x62E9;-taro-for-harmony&#xFF1F;"><a name="&#x4E3A;&#x4EC0;&#x4E48;&#x9009;&#x62E9;-taro-for-harmony&#xFF1F;" class="plugin-anchor" href="#&#x4E3A;&#x4EC0;&#x4E48;&#x9009;&#x62E9;-taro-for-harmony&#xFF1F;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x4E3A;&#x4EC0;&#x4E48;&#x9009;&#x62E9; Taro For Harmony&#xFF1F;</h1>
<h2 id="&#x591A;&#x7AEF;&#x7EDF;&#x4E00;&#x5F00;&#x53D1;&#x7684;&#x9700;&#x6C42;"><a name="&#x591A;&#x7AEF;&#x7EDF;&#x4E00;&#x5F00;&#x53D1;&#x7684;&#x9700;&#x6C42;" class="plugin-anchor" href="#&#x591A;&#x7AEF;&#x7EDF;&#x4E00;&#x5F00;&#x53D1;&#x7684;&#x9700;&#x6C42;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x591A;&#x7AEF;&#x7EDF;&#x4E00;&#x5F00;&#x53D1;&#x7684;&#x9700;&#x6C42;</h2>
<p>&#x5728;&#x79FB;&#x52A8;&#x4E92;&#x8054;&#x7F51;&#x5FEB;&#x901F;&#x53D1;&#x5C55;&#x7684;&#x4ECA;&#x5929;&#xFF0C;&#x5F00;&#x53D1;&#x8005;&#x9762;&#x4E34;&#x7740;&#x591A;&#x5E73;&#x53F0;&#x9002;&#x914D;&#x7684;&#x6311;&#x6218;&#x3002;&#x4F20;&#x7EDF;&#x7684;&#x5F00;&#x53D1;&#x6A21;&#x5F0F;&#x9700;&#x8981;&#x4E3A;&#x4E0D;&#x540C;&#x5E73;&#x53F0;&#x7F16;&#x5199;&#x4E0D;&#x540C;&#x7684;&#x4EE3;&#x7801;&#xFF0C;&#x8FD9;&#x4E0D;&#x4EC5;&#x589E;&#x52A0;&#x4E86;&#x5F00;&#x53D1;&#x6210;&#x672C;&#xFF0C;&#x4E5F;&#x63D0;&#x9AD8;&#x4E86;&#x7EF4;&#x62A4;&#x96BE;&#x5EA6;&#x3002;&#x968F;&#x7740;&#x9E3F;&#x8499;&#x751F;&#x6001;&#x7684;&#x5D1B;&#x8D77;&#xFF0C;&#x5F00;&#x53D1;&#x8005;&#x53C8;&#x591A;&#x4E86;&#x4E00;&#x4E2A;&#x9700;&#x8981;&#x9002;&#x914D;&#x7684;&#x5E73;&#x53F0;&#x3002;</p>
<h2 id="taro-&#x7684;&#x4F18;&#x52BF;"><a name="taro-&#x7684;&#x4F18;&#x52BF;" class="plugin-anchor" href="#taro-&#x7684;&#x4F18;&#x52BF;"><i class="fa fa-link" aria-hidden="true"></i></a>Taro &#x7684;&#x4F18;&#x52BF;</h2>
<h3 id="1-&#x4E00;&#x5957;&#x4EE3;&#x7801;&#xFF0C;&#x591A;&#x7AEF;&#x8FD0;&#x884C;"><a name="1-&#x4E00;&#x5957;&#x4EE3;&#x7801;&#xFF0C;&#x591A;&#x7AEF;&#x8FD0;&#x884C;" class="plugin-anchor" href="#1-&#x4E00;&#x5957;&#x4EE3;&#x7801;&#xFF0C;&#x591A;&#x7AEF;&#x8FD0;&#x884C;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x4E00;&#x5957;&#x4EE3;&#x7801;&#xFF0C;&#x591A;&#x7AEF;&#x8FD0;&#x884C;</h3>
<p>Taro &#x6700;&#x5927;&#x7684;&#x4F18;&#x52BF;&#x5728;&#x4E8E;&#x80FD;&#x591F;&#x7528;&#x4E00;&#x5957;&#x4EE3;&#x7801;&#x540C;&#x65F6;&#x9002;&#x914D;&#x591A;&#x4E2A;&#x5E73;&#x53F0;&#xFF1A;</p>
<ul>
<li>&#x5FAE;&#x4FE1;&#x5C0F;&#x7A0B;&#x5E8F;</li>
<li>&#x652F;&#x4ED8;&#x5B9D;&#x5C0F;&#x7A0B;&#x5E8F;</li>
<li>&#x767E;&#x5EA6;&#x5C0F;&#x7A0B;&#x5E8F;</li>
<li>&#x5B57;&#x8282;&#x8DF3;&#x52A8;&#x5C0F;&#x7A0B;&#x5E8F;</li>
<li>QQ &#x5C0F;&#x7A0B;&#x5E8F;</li>
<li>H5</li>
<li>React Native</li>
<li><strong>&#x9E3F;&#x8499; HarmonyOS</strong></li>
</ul>
<h3 id="2-&#x57FA;&#x4E8E;-react-&#x8BED;&#x6CD5;"><a name="2-&#x57FA;&#x4E8E;-react-&#x8BED;&#x6CD5;" class="plugin-anchor" href="#2-&#x57FA;&#x4E8E;-react-&#x8BED;&#x6CD5;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x57FA;&#x4E8E; React &#x8BED;&#x6CD5;</h3>
<p>Taro &#x91C7;&#x7528; React &#x8BED;&#x6CD5;&#xFF0C;&#x5BF9;&#x4E8E;&#x719F;&#x6089; React &#x7684;&#x5F00;&#x53D1;&#x8005;&#x6765;&#x8BF4;&#x5B66;&#x4E60;&#x6210;&#x672C;&#x6781;&#x4F4E;&#x3002;&#x540C;&#x65F6;&#x652F;&#x6301;&#xFF1A;</p>
<ul>
<li>JSX &#x8BED;&#x6CD5;</li>
<li>React Hooks</li>
<li>&#x7EC4;&#x4EF6;&#x5316;&#x5F00;&#x53D1;</li>
<li>TypeScript &#x652F;&#x6301;</li>
</ul>
<h3 id="3-&#x5B8C;&#x5584;&#x7684;&#x751F;&#x6001;&#x7CFB;&#x7EDF;"><a name="3-&#x5B8C;&#x5584;&#x7684;&#x751F;&#x6001;&#x7CFB;&#x7EDF;" class="plugin-anchor" href="#3-&#x5B8C;&#x5584;&#x7684;&#x751F;&#x6001;&#x7CFB;&#x7EDF;"><i class="fa fa-link" aria-hidden="true"></i></a>3. &#x5B8C;&#x5584;&#x7684;&#x751F;&#x6001;&#x7CFB;&#x7EDF;</h3>
<ul>
<li>&#x4E30;&#x5BCC;&#x7684;&#x7EC4;&#x4EF6;&#x5E93;</li>
<li>&#x6D3B;&#x8DC3;&#x7684;&#x793E;&#x533A;&#x652F;&#x6301;</li>
<li>&#x5B8C;&#x5584;&#x7684;&#x5F00;&#x53D1;&#x5DE5;&#x5177;&#x94FE;</li>
<li>&#x8BE6;&#x7EC6;&#x7684;&#x5B98;&#x65B9;&#x6587;&#x6863;</li>
</ul>
<h2 id="&#x9E3F;&#x8499;&#x751F;&#x6001;&#x7684;&#x673A;&#x9047;"><a name="&#x9E3F;&#x8499;&#x751F;&#x6001;&#x7684;&#x673A;&#x9047;" class="plugin-anchor" href="#&#x9E3F;&#x8499;&#x751F;&#x6001;&#x7684;&#x673A;&#x9047;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x9E3F;&#x8499;&#x751F;&#x6001;&#x7684;&#x673A;&#x9047;</h2>
<h3 id="1-&#x653F;&#x7B56;&#x652F;&#x6301;"><a name="1-&#x653F;&#x7B56;&#x652F;&#x6301;" class="plugin-anchor" href="#1-&#x653F;&#x7B56;&#x652F;&#x6301;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x653F;&#x7B56;&#x652F;&#x6301;</h3>
<p>&#x968F;&#x7740;&#x56FD;&#x4EA7;&#x5316;&#x8FDB;&#x7A0B;&#x7684;&#x63A8;&#x8FDB;&#xFF0C;&#x9E3F;&#x8499;&#x7CFB;&#x7EDF;&#x5F97;&#x5230;&#x4E86;&#x653F;&#x7B56;&#x5C42;&#x9762;&#x7684;&#x5927;&#x529B;&#x652F;&#x6301;&#xFF0C;&#x672A;&#x6765;&#x5728;&#x653F;&#x4F01;&#x5E02;&#x573A;&#x5C06;&#x6709;&#x5E7F;&#x9614;&#x7684;&#x5E94;&#x7528;&#x524D;&#x666F;&#x3002;</p>
<h3 id="2-&#x6280;&#x672F;&#x521B;&#x65B0;"><a name="2-&#x6280;&#x672F;&#x521B;&#x65B0;" class="plugin-anchor" href="#2-&#x6280;&#x672F;&#x521B;&#x65B0;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x6280;&#x672F;&#x521B;&#x65B0;</h3>
<p>&#x9E3F;&#x8499;&#x7CFB;&#x7EDF;&#x5728;&#x5206;&#x5E03;&#x5F0F;&#x67B6;&#x6784;&#x3001;&#x4E07;&#x7269;&#x4E92;&#x8054;&#x7B49;&#x65B9;&#x9762;&#x5177;&#x6709;&#x6280;&#x672F;&#x4F18;&#x52BF;&#xFF0C;&#x4E3A;&#x5F00;&#x53D1;&#x8005;&#x63D0;&#x4F9B;&#x4E86;&#x65B0;&#x7684;&#x6280;&#x672F;&#x63A2;&#x7D22;&#x7A7A;&#x95F4;&#x3002;</p>
<h3 id="3-&#x5E02;&#x573A;&#x673A;&#x4F1A;"><a name="3-&#x5E02;&#x573A;&#x673A;&#x4F1A;" class="plugin-anchor" href="#3-&#x5E02;&#x573A;&#x673A;&#x4F1A;"><i class="fa fa-link" aria-hidden="true"></i></a>3. &#x5E02;&#x573A;&#x673A;&#x4F1A;</h3>
<p>&#x4F5C;&#x4E3A;&#x65B0;&#x5174;&#x751F;&#x6001;&#xFF0C;&#x9E3F;&#x8499;&#x5E73;&#x53F0;&#x4E3A;&#x5F00;&#x53D1;&#x8005;&#x63D0;&#x4F9B;&#x4E86;&#x62A2;&#x5360;&#x5148;&#x673A;&#x7684;&#x673A;&#x4F1A;&#xFF0C;&#x65E9;&#x671F;&#x8FDB;&#x5165;&#x8005;&#x5C06;&#x83B7;&#x5F97;&#x66F4;&#x591A;&#x7684;&#x6D41;&#x91CF;&#x7EA2;&#x5229;&#x3002;</p>
<h2 id="taro-for-harmony-&#x7684;&#x4EF7;&#x503C;"><a name="taro-for-harmony-&#x7684;&#x4EF7;&#x503C;" class="plugin-anchor" href="#taro-for-harmony-&#x7684;&#x4EF7;&#x503C;"><i class="fa fa-link" aria-hidden="true"></i></a>Taro For Harmony &#x7684;&#x4EF7;&#x503C;</h2>
<h3 id="1-&#x964D;&#x4F4E;&#x5F00;&#x53D1;&#x6210;&#x672C;"><a name="1-&#x964D;&#x4F4E;&#x5F00;&#x53D1;&#x6210;&#x672C;" class="plugin-anchor" href="#1-&#x964D;&#x4F4E;&#x5F00;&#x53D1;&#x6210;&#x672C;"><i class="fa fa-link" aria-hidden="true"></i></a>1. &#x964D;&#x4F4E;&#x5F00;&#x53D1;&#x6210;&#x672C;</h3>
<p>&#x901A;&#x8FC7; Taro&#xFF0C;&#x5F00;&#x53D1;&#x8005;&#x53EF;&#x4EE5;&#x7528;&#x4E00;&#x5957;&#x4EE3;&#x7801;&#x540C;&#x65F6;&#x8986;&#x76D6;&#x4F20;&#x7EDF;&#x5E73;&#x53F0;&#x548C;&#x9E3F;&#x8499;&#x5E73;&#x53F0;&#xFF0C;&#x5927;&#x5927;&#x964D;&#x4F4E;&#x4E86;&#x5F00;&#x53D1;&#x548C;&#x7EF4;&#x62A4;&#x6210;&#x672C;&#x3002;</p>
<h3 id="2-&#x52A0;&#x901F;&#x4EA7;&#x54C1;&#x4E0A;&#x7EBF;"><a name="2-&#x52A0;&#x901F;&#x4EA7;&#x54C1;&#x4E0A;&#x7EBF;" class="plugin-anchor" href="#2-&#x52A0;&#x901F;&#x4EA7;&#x54C1;&#x4E0A;&#x7EBF;"><i class="fa fa-link" aria-hidden="true"></i></a>2. &#x52A0;&#x901F;&#x4EA7;&#x54C1;&#x4E0A;&#x7EBF;</h3>
<p>&#x65E0;&#x9700;&#x91CD;&#x65B0;&#x5F00;&#x53D1;&#xFF0C;&#x73B0;&#x6709;&#x7684; Taro &#x9879;&#x76EE;&#x53EF;&#x4EE5;&#x5FEB;&#x901F;&#x9002;&#x914D;&#x5230;&#x9E3F;&#x8499;&#x5E73;&#x53F0;&#xFF0C;&#x52A0;&#x901F;&#x4EA7;&#x54C1;&#x5728;&#x65B0;&#x5E73;&#x53F0;&#x7684;&#x4E0A;&#x7EBF;&#x901F;&#x5EA6;&#x3002;</p>
<h3 id="3-&#x6280;&#x80FD;&#x590D;&#x7528;"><a name="3-&#x6280;&#x80FD;&#x590D;&#x7528;" class="plugin-anchor" href="#3-&#x6280;&#x80FD;&#x590D;&#x7528;"><i class="fa fa-link" aria-hidden="true"></i></a>3. &#x6280;&#x80FD;&#x590D;&#x7528;</h3>
<p>&#x5F00;&#x53D1;&#x8005;&#x65E0;&#x9700;&#x5B66;&#x4E60;&#x5168;&#x65B0;&#x7684;&#x6280;&#x672F;&#x6808;&#xFF0C;&#x53EF;&#x4EE5;&#x5145;&#x5206;&#x5229;&#x7528;&#x73B0;&#x6709;&#x7684; React/Taro &#x5F00;&#x53D1;&#x7ECF;&#x9A8C;&#x3002;</p>
<h2 id="&#x5B66;&#x4E60;&#x672C;&#x4E66;&#x7684;&#x6536;&#x76CA;"><a name="&#x5B66;&#x4E60;&#x672C;&#x4E66;&#x7684;&#x6536;&#x76CA;" class="plugin-anchor" href="#&#x5B66;&#x4E60;&#x672C;&#x4E66;&#x7684;&#x6536;&#x76CA;"><i class="fa fa-link" aria-hidden="true"></i></a>&#x5B66;&#x4E60;&#x672C;&#x4E66;&#x7684;&#x6536;&#x76CA;</h2>
<p>&#x901A;&#x8FC7;&#x5B66;&#x4E60;&#x672C;&#x4E66;&#xFF0C;&#x60A8;&#x5C06;&#x83B7;&#x5F97;&#xFF1A;</p>
<ol>
<li><strong>&#x5168;&#x9762;&#x638C;&#x63E1;</strong> Taro For Harmony &#x7684;&#x5F00;&#x53D1;&#x6280;&#x80FD;</li>
<li><strong>&#x6DF1;&#x5165;&#x7406;&#x89E3;</strong> &#x9E3F;&#x8499;&#x5E73;&#x53F0;&#x7684;&#x7279;&#x6027;&#x548C;&#x5F00;&#x53D1;&#x8981;&#x70B9;</li>
<li><strong>&#x5B9E;&#x6218;&#x7ECF;&#x9A8C;</strong> &#x901A;&#x8FC7;&#x9879;&#x76EE;&#x6848;&#x4F8B;&#x83B7;&#x5F97;&#x5B9E;&#x9645;&#x5F00;&#x53D1;&#x7ECF;&#x9A8C;</li>
<li><strong>&#x524D;&#x77BB;&#x89C6;&#x91CE;</strong> &#x4E86;&#x89E3;&#x591A;&#x7AEF;&#x5F00;&#x53D1;&#x7684;&#x6700;&#x65B0;&#x8D8B;&#x52BF;&#x548C;&#x6700;&#x4F73;&#x5B9E;&#x8DF5;</li>
</ol>
<p>&#x8BA9;&#x6211;&#x4EEC;&#x4E00;&#x8D77;&#x8E0F;&#x4E0A; Taro For Harmony &#x7684;&#x5B66;&#x4E60;&#x4E4B;&#x65C5;&#xFF0C;&#x6293;&#x4F4F;&#x9E3F;&#x8499;&#x751F;&#x6001;&#x53D1;&#x5C55;&#x7684;&#x5386;&#x53F2;&#x673A;&#x9047;&#xFF01; </p>
<footer class="page-footer"><span class="copyright">powered by Gitbook</span><span class="footer-modification">&#x8BE5;&#x6587;&#x4EF6;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2025-06-29 08:53:09
</span></footer>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                </div>
                <script src="https://my.openwrite.cn/js/readmore.js"></script>
                <script>
                    var enablePlugin = false;
                    var allowDomain = "localhost";
                    if(allowDomain){
                        var currentDomain = location.hostname;
                        if ($.isArray(allowDomain)) {
                            $.each(allowDomain, function(index, item) {
                                if (currentDomain == item) {
                                    enablePlugin = true;
                                    return false;
                                }
                            });
                        }else{
                           if (currentDomain == allowDomain) {
                                enablePlugin = true;
                            }
                        }
                    }else{
                        enablePlugin = true;
                    }
                    
                    if(enablePlugin){
                        var isMobile = navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i);
                        if (!isMobile) {
                            var btw = new BTWPlugin();
                            btw.init({"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果","id":"vip-container"});
                        }
                    }
                </script> 
          </section>
          
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>
 
          <div class="book-footer">
            
            <div class="donate">
              <div></div>
              <button class="donate-btn" onclick="showModal()">赞赏</button>
            </div>
             
            <div class="copyright"></div>
            
          </div>
          
        </div>
      </div>
      
    </div>

     
    <a
      href="./"
      class="
        navigation navigation-prev
        
      "
      aria-label="Previous page: 前言"
    >
      <i class="fa fa-angle-left"></i>
    </a>
     
    <a
      href="chapter1/1.Taro介绍.html"
      class="
        navigation navigation-next
        
      "
      aria-label="Next page: 3.1 Taro 框架介绍"
    >
      <i class="fa fa-angle-right"></i>
    </a>
      
  </div>
  <script>
    function showModal() {
      document.getElementsByClassName("mask")[0].style.display = "block";
      document.getElementsByClassName("donate-modal")[0].style.display =
        "block";
    }
    // 切换赞赏码
    function showDonateImg(num) {
      let alipay = "";
      let wxpay = ""
      if(num){
        wxpay = "hidden"
      }else{
        alipay = "hidden"
      }
      document.getElementById("wxpay-code").hidden = wxpay;
      document.getElementById("alipay-code").hidden = alipay;
      document.getElementsByName("pay-way")[num].checked = "checked";
    }

    // 关闭赞赏框
    function closeDonateModal() {
      document.getElementsByClassName("mask")[0].style.display = "none";
      document.getElementsByClassName("donate-modal")[0].style.display = "none";
    }

    var gitbook = gitbook || [];
    gitbook.push(function () {
      gitbook.page.hasChanged({"page":{"title":"为什么选择 Taro For Harmony？","level":"1.2","depth":1,"next":{"title":"3.1 Taro 框架介绍","level":"2.1","depth":1,"path":"chapter1/1.Taro介绍.md","ref":"./chapter1/1.Taro介绍.md","articles":[]},"previous":{"title":"前言","level":"1.1","depth":1,"path":"README.md","ref":"README.md","articles":[]},"dir":"ltr"},"config":{"plugins":["github-buttons@2.1.0","edit-link","splitter","tbfed-pagefooter","expandable-chapters","chapter-fold","back-to-top-button","code","pageview-count","popup","search-plus","-lunr","-search","splitter","-sharing","sharing-plus","theme-lou","mind-maps","emphasize","anchors","changyan","readmore","livereload","ace","livereload"],"root":".","styles":{"website":"styles/website.css"},"pluginsConfig":{"tbfed-pagefooter":{"modify_label":"该文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"chapter-fold":{},"pluginsConfig":{"expandable-chapters":{}},"emphasize":{},"ace":{},"livereload":{},"splitter":{},"readmore":{"allowDomain":"localhost","blogId":"27976-1678928361372-483","name":"坚果派","qrcode":"https://luckly007.oss-cn-beijing.aliyuncs.com/images/image-20230316085818226.png","keyword":"鸿蒙坚果"},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"theme-lou":{"hide-elements":[".summary .gitbook-link",".summary .divider"],"color":"#FF4848","book-anchor-title":"本章目录","copyright":{"author":"vx:nut_pie"},"forbidCopy":true,"logo":"assets/avatar.png","book-summary-title":"文章目录","search-placeholder":"输入关键字搜索","copyrightLogo":"assets/copyright.png","favicon":"assets/avatar.png","appleTouchIconPrecomposed152":"assets/avatar.png"},"changyan":{"appid":"cyvHoCPAs","conf":"0440cfc4168ba95d73cfc52dd4d5c60b"},"fontsettings":{"theme":"white","family":"sans","size":2},"mind-maps":{},"highlight":{},"back-to-top-button":{},"pageview-count":{},"github-buttons":{"repo":"ITmxs/gitbook","types":["star","watch","fork"],"size":"small"},"sharing":{"qq":false,"all":["qq","qzone","whatsapp","douban","facebook","google","instapaper","linkedin","messenger","twitter","weibo"],"douban":false,"facebook":false,"weibo":false,"twitter":false,"pocket":false,"google":false,"qzone":false},"edit-link":{"label":"编辑此页","base":"https://github.com/ITmxs/gitbook/edit/master/"},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"anchors":{},"expandable-chapters":{},"search-plus":{}},"theme":"default","author":"坚果派","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{"themeLou":{"nav":[{"target":"_blank","url":"https://www.gitbook.com/","name":"坚果派官网"},{"target":"_blank","url":"https://www.npmjs.com/package/package","name":"ArkUI实战"},{"target":"_blank","url":"https://space.bilibili.com/480883651","name":"元服务开发实践"},{"target":"_blank","url":"https://blog.51cto.com/jianguo","name":"OpenHarmony应用开发"}],"footer":{"donate":{"wechat":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","message":"随意打赏，但不要超过一顿早餐钱 💕","wxpay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202901895.png","alipay":"https://luckly007.oss-cn-beijing.aliyuncs.com/img/image-20210922202843746.png","nickname":"breeze","button":"打赏","wechatText":"微信","alipayText":"支付宝","title":"『赠人玫瑰 🌹 手有余香 』","avatar":"http://xkapp-uat.oss-cn-hangzhou.aliyuncs.com/2e7a3f70-80ab-4b50-93ec-a04dfeef949b/avatar-100.png"},"copyright":true}}},"title":"Taro for Harmony教程","language":"zh-hans","gitbook":"*","description":"Taro for Harmony电子书教程"},"file":{"path":"为什么要写博客.md","mtime":"2025-06-29T00:53:09.442Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2025-06-30T01:16:51.558Z"},"basePath":".","book":{"language":""}});
    });
  </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-edit-link/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-chapter-fold/chapter-fold.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-mind-maps/mindmaps.dist.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-changyan/changyan.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-ace/ace/ace.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-ace/ace.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-theme-lou/lou.js"></script>
        
    

    </body>
</html>

